measuring internal resistance of a cell